package edu.ynu.se.xiecheng.achitectureclass.dao;

import edu.ynu.se.xiecheng.achitectureclass.common.dao.LogicDAO;
import edu.ynu.se.xiecheng.achitectureclass.entity.CameraDataEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.domain.Pageable;

public interface CameraDataDao extends LogicDAO<CameraDataEntity, Long> {
    @Query("SELECT c.photo FROM CameraDataEntity c WHERE c.isDeleted = 0 ORDER BY c.id DESC")
    Page<String> findLastThreePhotos(Pageable pageable);
}
